
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module gdata.tlslite.integration.XMLRPCTransport</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="gdata.html"><font color="#ffffff">gdata</font></a>.<a href="gdata.tlslite.html"><font color="#ffffff">tlslite</font></a>.<a href="gdata.tlslite.integration.html"><font color="#ffffff">integration</font></a>.XMLRPCTransport</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/afshar/wrk/gdata-python-client/src/gdata/tlslite/integration/XMLRPCTransport.py">/home/afshar/wrk/gdata-python-client/src/gdata/tlslite/integration/XMLRPCTransport.py</a></font></td></tr></table>
    <p><tt>TLS&nbsp;Lite&nbsp;+&nbsp;xmlrpclib.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="httplib.html">httplib</a><br>
</td><td width="25%" valign=top><a href="xmlrpclib.html">xmlrpclib</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="gdata.tlslite.integration.ClientHelper.html#ClientHelper">gdata.tlslite.integration.ClientHelper.ClientHelper</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="gdata.tlslite.integration.XMLRPCTransport.html#XMLRPCTransport">XMLRPCTransport</a>(<a href="xmlrpclib.html#Transport">xmlrpclib.Transport</a>, <a href="gdata.tlslite.integration.ClientHelper.html#ClientHelper">gdata.tlslite.integration.ClientHelper.ClientHelper</a>)
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="xmlrpclib.html#Transport">xmlrpclib.Transport</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="gdata.tlslite.integration.XMLRPCTransport.html#XMLRPCTransport">XMLRPCTransport</a>(<a href="xmlrpclib.html#Transport">xmlrpclib.Transport</a>, <a href="gdata.tlslite.integration.ClientHelper.html#ClientHelper">gdata.tlslite.integration.ClientHelper.ClientHelper</a>)
</font></dt></dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="XMLRPCTransport">class <strong>XMLRPCTransport</strong></a>(<a href="xmlrpclib.html#Transport">xmlrpclib.Transport</a>, <a href="gdata.tlslite.integration.ClientHelper.html#ClientHelper">gdata.tlslite.integration.ClientHelper.ClientHelper</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Handles&nbsp;an&nbsp;HTTPS&nbsp;transaction&nbsp;to&nbsp;an&nbsp;XML-RPC&nbsp;server.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="gdata.tlslite.integration.XMLRPCTransport.html#XMLRPCTransport">XMLRPCTransport</a></dd>
<dd><a href="xmlrpclib.html#Transport">xmlrpclib.Transport</a></dd>
<dd><a href="gdata.tlslite.integration.ClientHelper.html#ClientHelper">gdata.tlslite.integration.ClientHelper.ClientHelper</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="XMLRPCTransport-__init__"><strong>__init__</strong></a>(self, username<font color="#909090">=None</font>, password<font color="#909090">=None</font>, sharedKey<font color="#909090">=None</font>, certChain<font color="#909090">=None</font>, privateKey<font color="#909090">=None</font>, cryptoID<font color="#909090">=None</font>, protocol<font color="#909090">=None</font>, x509Fingerprint<font color="#909090">=None</font>, x509TrustList<font color="#909090">=None</font>, x509CommonName<font color="#909090">=None</font>, settings<font color="#909090">=None</font>)</dt><dd><tt>Create&nbsp;a&nbsp;new&nbsp;<a href="#XMLRPCTransport">XMLRPCTransport</a>.<br>
&nbsp;<br>
An&nbsp;instance&nbsp;of&nbsp;this&nbsp;class&nbsp;can&nbsp;be&nbsp;passed&nbsp;to&nbsp;L{xmlrpclib.ServerProxy}<br>
to&nbsp;use&nbsp;TLS&nbsp;with&nbsp;XML-RPC&nbsp;calls::<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;from&nbsp;tlslite.api&nbsp;import&nbsp;<a href="#XMLRPCTransport">XMLRPCTransport</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;from&nbsp;xmlrpclib&nbsp;import&nbsp;ServerProxy<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;transport&nbsp;=&nbsp;<a href="#XMLRPCTransport">XMLRPCTransport</a>(user="alice",&nbsp;password="abra123")<br>
&nbsp;&nbsp;&nbsp;&nbsp;server&nbsp;=&nbsp;ServerProxy("https://localhost",&nbsp;transport)<br>
&nbsp;<br>
For&nbsp;client&nbsp;authentication,&nbsp;use&nbsp;one&nbsp;of&nbsp;these&nbsp;argument<br>
combinations:<br>
&nbsp;-&nbsp;username,&nbsp;password&nbsp;(SRP)<br>
&nbsp;-&nbsp;username,&nbsp;sharedKey&nbsp;(shared-key)<br>
&nbsp;-&nbsp;certChain,&nbsp;privateKey&nbsp;(certificate)<br>
&nbsp;<br>
For&nbsp;server&nbsp;authentication,&nbsp;you&nbsp;can&nbsp;either&nbsp;rely&nbsp;on&nbsp;the<br>
implicit&nbsp;mutual&nbsp;authentication&nbsp;performed&nbsp;by&nbsp;SRP&nbsp;or<br>
shared-keys,&nbsp;or&nbsp;you&nbsp;can&nbsp;do&nbsp;certificate-based&nbsp;server<br>
authentication&nbsp;with&nbsp;one&nbsp;of&nbsp;these&nbsp;argument&nbsp;combinations:<br>
&nbsp;-&nbsp;cryptoID[,&nbsp;protocol]&nbsp;(requires&nbsp;cryptoIDlib)<br>
&nbsp;-&nbsp;x509Fingerprint<br>
&nbsp;-&nbsp;x509TrustList[,&nbsp;x509CommonName]&nbsp;(requires&nbsp;cryptlib_py)<br>
&nbsp;<br>
Certificate-based&nbsp;server&nbsp;authentication&nbsp;is&nbsp;compatible&nbsp;with<br>
SRP&nbsp;or&nbsp;certificate-based&nbsp;client&nbsp;authentication.&nbsp;&nbsp;It&nbsp;is<br>
not&nbsp;compatible&nbsp;with&nbsp;shared-keys.<br>
&nbsp;<br>
The&nbsp;constructor&nbsp;does&nbsp;not&nbsp;perform&nbsp;the&nbsp;TLS&nbsp;handshake&nbsp;itself,&nbsp;but<br>
simply&nbsp;stores&nbsp;these&nbsp;arguments&nbsp;for&nbsp;later.&nbsp;&nbsp;The&nbsp;handshake&nbsp;is<br>
performed&nbsp;only&nbsp;when&nbsp;this&nbsp;class&nbsp;needs&nbsp;to&nbsp;connect&nbsp;with&nbsp;the<br>
server.&nbsp;&nbsp;Thus&nbsp;you&nbsp;should&nbsp;be&nbsp;prepared&nbsp;to&nbsp;handle&nbsp;TLS-specific<br>
exceptions&nbsp;when&nbsp;calling&nbsp;methods&nbsp;of&nbsp;L{xmlrpclib.ServerProxy}.&nbsp;&nbsp;See&nbsp;the<br>
client&nbsp;handshake&nbsp;functions&nbsp;in<br>
L{tlslite.TLSConnection.TLSConnection}&nbsp;for&nbsp;details&nbsp;on&nbsp;which<br>
exceptions&nbsp;might&nbsp;be&nbsp;raised.<br>
&nbsp;<br>
@type&nbsp;username:&nbsp;str<br>
@param&nbsp;username:&nbsp;SRP&nbsp;or&nbsp;shared-key&nbsp;username.&nbsp;&nbsp;Requires&nbsp;the<br>
'password'&nbsp;or&nbsp;'sharedKey'&nbsp;argument.<br>
&nbsp;<br>
@type&nbsp;password:&nbsp;str<br>
@param&nbsp;password:&nbsp;SRP&nbsp;password&nbsp;for&nbsp;mutual&nbsp;authentication.<br>
Requires&nbsp;the&nbsp;'username'&nbsp;argument.<br>
&nbsp;<br>
@type&nbsp;sharedKey:&nbsp;str<br>
@param&nbsp;sharedKey:&nbsp;Shared&nbsp;key&nbsp;for&nbsp;mutual&nbsp;authentication.<br>
Requires&nbsp;the&nbsp;'username'&nbsp;argument.<br>
&nbsp;<br>
@type&nbsp;certChain:&nbsp;L{tlslite.X509CertChain.X509CertChain}&nbsp;or<br>
L{cryptoIDlib.CertChain.CertChain}<br>
@param&nbsp;certChain:&nbsp;Certificate&nbsp;chain&nbsp;for&nbsp;client&nbsp;authentication.<br>
Requires&nbsp;the&nbsp;'privateKey'&nbsp;argument.&nbsp;&nbsp;Excludes&nbsp;the&nbsp;SRP&nbsp;or<br>
shared-key&nbsp;related&nbsp;arguments.<br>
&nbsp;<br>
@type&nbsp;privateKey:&nbsp;L{tlslite.utils.RSAKey.RSAKey}<br>
@param&nbsp;privateKey:&nbsp;Private&nbsp;key&nbsp;for&nbsp;client&nbsp;authentication.<br>
Requires&nbsp;the&nbsp;'certChain'&nbsp;argument.&nbsp;&nbsp;Excludes&nbsp;the&nbsp;SRP&nbsp;or<br>
shared-key&nbsp;related&nbsp;arguments.<br>
&nbsp;<br>
@type&nbsp;cryptoID:&nbsp;str<br>
@param&nbsp;cryptoID:&nbsp;cryptoID&nbsp;for&nbsp;server&nbsp;authentication.&nbsp;&nbsp;Mutually<br>
exclusive&nbsp;with&nbsp;the&nbsp;'x509...'&nbsp;arguments.<br>
&nbsp;<br>
@type&nbsp;protocol:&nbsp;str<br>
@param&nbsp;protocol:&nbsp;cryptoID&nbsp;protocol&nbsp;URI&nbsp;for&nbsp;server<br>
authentication.&nbsp;&nbsp;Requires&nbsp;the&nbsp;'cryptoID'&nbsp;argument.<br>
&nbsp;<br>
@type&nbsp;x509Fingerprint:&nbsp;str<br>
@param&nbsp;x509Fingerprint:&nbsp;Hex-encoded&nbsp;X.509&nbsp;fingerprint&nbsp;for<br>
server&nbsp;authentication.&nbsp;&nbsp;Mutually&nbsp;exclusive&nbsp;with&nbsp;the&nbsp;'cryptoID'<br>
and&nbsp;'x509TrustList'&nbsp;arguments.<br>
&nbsp;<br>
@type&nbsp;x509TrustList:&nbsp;list&nbsp;of&nbsp;L{tlslite.X509.X509}<br>
@param&nbsp;x509TrustList:&nbsp;A&nbsp;list&nbsp;of&nbsp;trusted&nbsp;root&nbsp;certificates.&nbsp;&nbsp;The<br>
other&nbsp;party&nbsp;must&nbsp;present&nbsp;a&nbsp;certificate&nbsp;chain&nbsp;which&nbsp;extends&nbsp;to<br>
one&nbsp;of&nbsp;these&nbsp;root&nbsp;certificates.&nbsp;&nbsp;The&nbsp;cryptlib_py&nbsp;module&nbsp;must&nbsp;be<br>
installed&nbsp;to&nbsp;use&nbsp;this&nbsp;parameter.&nbsp;&nbsp;Mutually&nbsp;exclusive&nbsp;with&nbsp;the<br>
'cryptoID'&nbsp;and&nbsp;'x509Fingerprint'&nbsp;arguments.<br>
&nbsp;<br>
@type&nbsp;x509CommonName:&nbsp;str<br>
@param&nbsp;x509CommonName:&nbsp;The&nbsp;end-entity&nbsp;certificate's&nbsp;'CN'&nbsp;field<br>
must&nbsp;match&nbsp;this&nbsp;value.&nbsp;&nbsp;For&nbsp;a&nbsp;web&nbsp;server,&nbsp;this&nbsp;is&nbsp;typically&nbsp;a<br>
server&nbsp;name&nbsp;such&nbsp;as&nbsp;'www.amazon.com'.&nbsp;&nbsp;Mutually&nbsp;exclusive&nbsp;with<br>
the&nbsp;'cryptoID'&nbsp;and&nbsp;'x509Fingerprint'&nbsp;arguments.&nbsp;&nbsp;Requires&nbsp;the<br>
'x509TrustList'&nbsp;argument.<br>
&nbsp;<br>
@type&nbsp;settings:&nbsp;L{tlslite.HandshakeSettings.HandshakeSettings}<br>
@param&nbsp;settings:&nbsp;Various&nbsp;settings&nbsp;which&nbsp;can&nbsp;be&nbsp;used&nbsp;to&nbsp;control<br>
the&nbsp;ciphersuites,&nbsp;certificate&nbsp;types,&nbsp;and&nbsp;SSL/TLS&nbsp;versions<br>
offered&nbsp;by&nbsp;the&nbsp;client.</tt></dd></dl>

<dl><dt><a name="XMLRPCTransport-make_connection"><strong>make_connection</strong></a>(self, host)</dt></dl>

<hr>
Methods inherited from <a href="xmlrpclib.html#Transport">xmlrpclib.Transport</a>:<br>
<dl><dt><a name="XMLRPCTransport-get_host_info"><strong>get_host_info</strong></a>(self, host)</dt></dl>

<dl><dt><a name="XMLRPCTransport-getparser"><strong>getparser</strong></a>(self)</dt></dl>

<dl><dt><a name="XMLRPCTransport-parse_response"><strong>parse_response</strong></a>(self, file)</dt></dl>

<dl><dt><a name="XMLRPCTransport-request"><strong>request</strong></a>(self, host, handler, request_body, verbose<font color="#909090">=0</font>)</dt></dl>

<dl><dt><a name="XMLRPCTransport-send_content"><strong>send_content</strong></a>(self, connection, request_body)</dt></dl>

<dl><dt><a name="XMLRPCTransport-send_host"><strong>send_host</strong></a>(self, connection, host)</dt></dl>

<dl><dt><a name="XMLRPCTransport-send_request"><strong>send_request</strong></a>(self, connection, handler, request_body)</dt></dl>

<dl><dt><a name="XMLRPCTransport-send_user_agent"><strong>send_user_agent</strong></a>(self, connection)</dt></dl>

<hr>
Data and other attributes inherited from <a href="xmlrpclib.html#Transport">xmlrpclib.Transport</a>:<br>
<dl><dt><strong>user_agent</strong> = 'xmlrpclib.py/1.0.1 (by www.pythonware.com)'</dl>

</td></tr></table></td></tr></table>
</body></html>